<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<div class="pro_list fr"  >
   <div class="title"  >
   	 <span class="titletxt">您现在的位置：</span>
     <ul> 
       <li class="root">会员中心</li>        
       <li>用户管理</li>  
       <li>密码管理</li>            
     </ul>
   </div>
  <c:if test="${not empty ret }">
   	<c:if test="${ret.code ne '200'}">
   		<script type="text/javascript">alertError('${ret.result}');</script>
   		<div id=messager class="messager" >
	         <div class="contentmsg">
	             <h5>提示信息～！</h5>
	             <ul>
	               <li>${ret.result}</li>
	             </ul>
	        </div>
	     <div class="closer" onClick="showHideLayer('messager');" title="关闭"></div>
	    </div>
   	</c:if>
   </c:if>
   	<c:if test="${not empty sessionScope.SIMPLE_PASSWORD}">
	  	<script type="text/javascript">alert("为了您的账号安全,请尽快修改您的登录密码!");</script>
	  	   		<div id=messager class="messager" >
	         <div class="contentmsg">
	             <h5>提示信息～！</h5>
	             <ul>
	               <li>为了您的账号安全,请尽快修改您的登录密码!</li>
	             </ul>
	        </div>
	     <div class="closer" onClick="showHideLayer('messager');" title="关闭"></div>
	    </div>
	</c:if>
   <br/>
   <div class="easyui-tabs" data-options="tools:'#tab-tools'" >
       <div title="密码修改" style="padding:10px;">
        <form id="drugBillInfo" method="post" >
		<table width="765px" border="0" cellspacing="0" cellpadding="0" style="margin: 20px;border-top: 1px solid #ddd;">
		  <tr>
		    <td class="table_td">原密码</td>
		    <td class="juleft" colspan="5">
		        <input type="password"  class="easyui-validatebox" name="oldLoginPwd" id="oldLoginPwd" data-options="required:true"/>  
		    </td>
		  </tr>
		  <tr>
		    <td class="table_td" >新密码</td>
		    <td class="juleft" colspan="5">
		        <input type="password" class="easyui-validatebox" name="loginPwd" id="loginPwd" data-options="required:true"/>  
		    </td>
		  </tr>
		  <tr>
		    <td class="table_td" >确认新密码</td>
		    <td class="juleft" colspan="5">
		        <input type="password" class="easyui-validatebox" id="conLoginPwd" data-options="required:true" validType="same['loginPwd']"/>  
		    </td>
		  </tr>
		 
		  <tr>
		  	<td>
		    </td>
		    <td> <a href="javascript:submitForm();" class="easyui-linkbutton" style="width:80px; margin-top:10px;">提交</a> </td>
		    </tr>
		</table>
		</form>
	</div>
    
        </div>
    </div>
                         
<script>
function submitForm(){
	$('#drugBillInfo').form('submit', {
	    url:'<c:url value="/user/updateUserPassword.s"/>',
	    onSubmit: function(param){
	    	if(!$("#drugBillInfo").form('validate')){
	    		return false;
	    	}
	    },
	    success:function(data){
		    var ret = eval("("+data+")");
	     	if(ret.code=="200"){ 
	     		 layer.msg("密码修改成功",1, {type: 1,shade: [0.2, '#ccc']});
		    }else{
		    	 layer.msg(ret.result,1, {type: 3,shade: [0.2, '#ccc']});
			}
	    }
	});
}
</script>